/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kks;

import java.sql.Date;
import java.text.DateFormat;
import java.util.Calendar;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JToolBar;
import javax.swing.SwingConstants;

/**
 *
 * @author basti
 */
public class ToolbarDate extends JToolBar{
    private JButton btnToday;
    private JButton btnTommorow;
    private JButton btnDay3;
    private JButton btnDay4;
    private JButton btnDay5;
    private JButton btnDay6;
    private JButton btnDay7;

    private void initComps()
    {
        btnToday = new JButton(dateToButtons(1));
        /*btnToday = new JButton("Tomorrow");
        btnToday = new JButton("3");
        btnToday = new JButton("4");
        btnToday = new JButton("5");
        btnToday = new JButton("6");
        btnToday = new JButton("7");*/
        
        btnToday.setFocusable(false);
        btnToday.setHorizontalTextPosition(SwingConstants.CENTER);
        btnToday.setVerticalTextPosition(SwingConstants.BOTTOM);        
        //btnHome.setIcon(new ImageIcon(getClass().getResource("/images/icons/cottage-64.png")));
    }
    
    ToolbarDate()
    {
        initComps();
        //Toolbar options
        setFloatable(false);
        setBackground(CustomColors.BackgroundLight);
        add(btnToday);        
        

    }
    
    private String dateToButtons(int day)
    {
        Calendar cal = Calendar.getInstance();
        DateFormat df = DateFormat.getDateInstance(DateFormat.FULL);
        String s = df.format(cal.getTime());
        return s;
    }
        
}
